The present invention relates to a demultiplexer for separating desired data from a multiplexed stream.
In a DVD (Digital Versatile Disk) which is one of the optical disks, compressed/encoded data of video, sound, etc., is recorded. Data read out of the DVD is in the form of an input stream which is formed by a plurality of packets each including a packet header and a payload. Thus, a DVD player requires a demultiplexer for extracting a desired payload from the input stream and supplying the extracted payload to a decoder for decompression.
If a correct payload, i.e., correct data, is not supplied to the decoder, a decoding result of video, sound, or the like, includes disturbances. In the worst case, there is a possibility that the operation of the decoder stops (hangs).
According to a conventional technique disclosed in Japanese Laid-Open Patent Publication No. 8-79709, synchronization recovery of a decoder is realized based on sector synchronization information such that the time required for recovery since occurrence of an error is shortened.
In an optical disk compliant with the DVD standards, every packet header includes a start code without exception, and therefore, the packet header can be detected by a demultiplexer without fail. Further, a payload can be separated without fail based on information included in the packet header, such as payload length information, or the like.
However, in the case where an optical disk incompliant with the DVD standards is placed in a DVD player, there is a possibility that a demultiplexer misdetects a packet header. In this case, a wrong payload is supplied to a decoder. In the worst case, the decoder hangs as described above.